package com.zhongwang.mms.gen.entity;

import java.util.ArrayList;
import java.util.List;

public class HInventoryMaterielInfoExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public HInventoryMaterielInfoExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andImiIdIsNull() {
            addCriterion("imi_id is null");
            return (Criteria) this;
        }

        public Criteria andImiIdIsNotNull() {
            addCriterion("imi_id is not null");
            return (Criteria) this;
        }

        public Criteria andImiIdEqualTo(Integer value) {
            addCriterion("imi_id =", value, "imiId");
            return (Criteria) this;
        }

        public Criteria andImiIdNotEqualTo(Integer value) {
            addCriterion("imi_id <>", value, "imiId");
            return (Criteria) this;
        }

        public Criteria andImiIdGreaterThan(Integer value) {
            addCriterion("imi_id >", value, "imiId");
            return (Criteria) this;
        }

        public Criteria andImiIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("imi_id >=", value, "imiId");
            return (Criteria) this;
        }

        public Criteria andImiIdLessThan(Integer value) {
            addCriterion("imi_id <", value, "imiId");
            return (Criteria) this;
        }

        public Criteria andImiIdLessThanOrEqualTo(Integer value) {
            addCriterion("imi_id <=", value, "imiId");
            return (Criteria) this;
        }

        public Criteria andImiIdIn(List<Integer> values) {
            addCriterion("imi_id in", values, "imiId");
            return (Criteria) this;
        }

        public Criteria andImiIdNotIn(List<Integer> values) {
            addCriterion("imi_id not in", values, "imiId");
            return (Criteria) this;
        }

        public Criteria andImiIdBetween(Integer value1, Integer value2) {
            addCriterion("imi_id between", value1, value2, "imiId");
            return (Criteria) this;
        }

        public Criteria andImiIdNotBetween(Integer value1, Integer value2) {
            addCriterion("imi_id not between", value1, value2, "imiId");
            return (Criteria) this;
        }

        public Criteria andImiFieldIsNull() {
            addCriterion("imi_field is null");
            return (Criteria) this;
        }

        public Criteria andImiFieldIsNotNull() {
            addCriterion("imi_field is not null");
            return (Criteria) this;
        }

        public Criteria andImiFieldEqualTo(String value) {
            addCriterion("imi_field =", value, "imiField");
            return (Criteria) this;
        }

        public Criteria andImiFieldNotEqualTo(String value) {
            addCriterion("imi_field <>", value, "imiField");
            return (Criteria) this;
        }

        public Criteria andImiFieldGreaterThan(String value) {
            addCriterion("imi_field >", value, "imiField");
            return (Criteria) this;
        }

        public Criteria andImiFieldGreaterThanOrEqualTo(String value) {
            addCriterion("imi_field >=", value, "imiField");
            return (Criteria) this;
        }

        public Criteria andImiFieldLessThan(String value) {
            addCriterion("imi_field <", value, "imiField");
            return (Criteria) this;
        }

        public Criteria andImiFieldLessThanOrEqualTo(String value) {
            addCriterion("imi_field <=", value, "imiField");
            return (Criteria) this;
        }

        public Criteria andImiFieldLike(String value) {
            addCriterion("imi_field like", value, "imiField");
            return (Criteria) this;
        }

        public Criteria andImiFieldNotLike(String value) {
            addCriterion("imi_field not like", value, "imiField");
            return (Criteria) this;
        }

        public Criteria andImiFieldIn(List<String> values) {
            addCriterion("imi_field in", values, "imiField");
            return (Criteria) this;
        }

        public Criteria andImiFieldNotIn(List<String> values) {
            addCriterion("imi_field not in", values, "imiField");
            return (Criteria) this;
        }

        public Criteria andImiFieldBetween(String value1, String value2) {
            addCriterion("imi_field between", value1, value2, "imiField");
            return (Criteria) this;
        }

        public Criteria andImiFieldNotBetween(String value1, String value2) {
            addCriterion("imi_field not between", value1, value2, "imiField");
            return (Criteria) this;
        }

        public Criteria andImiValueIsNull() {
            addCriterion("imi_value is null");
            return (Criteria) this;
        }

        public Criteria andImiValueIsNotNull() {
            addCriterion("imi_value is not null");
            return (Criteria) this;
        }

        public Criteria andImiValueEqualTo(Double value) {
            addCriterion("imi_value =", value, "imiValue");
            return (Criteria) this;
        }

        public Criteria andImiValueNotEqualTo(Double value) {
            addCriterion("imi_value <>", value, "imiValue");
            return (Criteria) this;
        }

        public Criteria andImiValueGreaterThan(Double value) {
            addCriterion("imi_value >", value, "imiValue");
            return (Criteria) this;
        }

        public Criteria andImiValueGreaterThanOrEqualTo(Double value) {
            addCriterion("imi_value >=", value, "imiValue");
            return (Criteria) this;
        }

        public Criteria andImiValueLessThan(Double value) {
            addCriterion("imi_value <", value, "imiValue");
            return (Criteria) this;
        }

        public Criteria andImiValueLessThanOrEqualTo(Double value) {
            addCriterion("imi_value <=", value, "imiValue");
            return (Criteria) this;
        }

        public Criteria andImiValueIn(List<Double> values) {
            addCriterion("imi_value in", values, "imiValue");
            return (Criteria) this;
        }

        public Criteria andImiValueNotIn(List<Double> values) {
            addCriterion("imi_value not in", values, "imiValue");
            return (Criteria) this;
        }

        public Criteria andImiValueBetween(Double value1, Double value2) {
            addCriterion("imi_value between", value1, value2, "imiValue");
            return (Criteria) this;
        }

        public Criteria andImiValueNotBetween(Double value1, Double value2) {
            addCriterion("imi_value not between", value1, value2, "imiValue");
            return (Criteria) this;
        }

        public Criteria andImiUnitIsNull() {
            addCriterion("imi_unit is null");
            return (Criteria) this;
        }

        public Criteria andImiUnitIsNotNull() {
            addCriterion("imi_unit is not null");
            return (Criteria) this;
        }

        public Criteria andImiUnitEqualTo(String value) {
            addCriterion("imi_unit =", value, "imiUnit");
            return (Criteria) this;
        }

        public Criteria andImiUnitNotEqualTo(String value) {
            addCriterion("imi_unit <>", value, "imiUnit");
            return (Criteria) this;
        }

        public Criteria andImiUnitGreaterThan(String value) {
            addCriterion("imi_unit >", value, "imiUnit");
            return (Criteria) this;
        }

        public Criteria andImiUnitGreaterThanOrEqualTo(String value) {
            addCriterion("imi_unit >=", value, "imiUnit");
            return (Criteria) this;
        }

        public Criteria andImiUnitLessThan(String value) {
            addCriterion("imi_unit <", value, "imiUnit");
            return (Criteria) this;
        }

        public Criteria andImiUnitLessThanOrEqualTo(String value) {
            addCriterion("imi_unit <=", value, "imiUnit");
            return (Criteria) this;
        }

        public Criteria andImiUnitLike(String value) {
            addCriterion("imi_unit like", value, "imiUnit");
            return (Criteria) this;
        }

        public Criteria andImiUnitNotLike(String value) {
            addCriterion("imi_unit not like", value, "imiUnit");
            return (Criteria) this;
        }

        public Criteria andImiUnitIn(List<String> values) {
            addCriterion("imi_unit in", values, "imiUnit");
            return (Criteria) this;
        }

        public Criteria andImiUnitNotIn(List<String> values) {
            addCriterion("imi_unit not in", values, "imiUnit");
            return (Criteria) this;
        }

        public Criteria andImiUnitBetween(String value1, String value2) {
            addCriterion("imi_unit between", value1, value2, "imiUnit");
            return (Criteria) this;
        }

        public Criteria andImiUnitNotBetween(String value1, String value2) {
            addCriterion("imi_unit not between", value1, value2, "imiUnit");
            return (Criteria) this;
        }

        public Criteria andImiItyIdIsNull() {
            addCriterion("imi_ity_id is null");
            return (Criteria) this;
        }

        public Criteria andImiItyIdIsNotNull() {
            addCriterion("imi_ity_id is not null");
            return (Criteria) this;
        }

        public Criteria andImiItyIdEqualTo(Integer value) {
            addCriterion("imi_ity_id =", value, "imiItyId");
            return (Criteria) this;
        }

        public Criteria andImiItyIdNotEqualTo(Integer value) {
            addCriterion("imi_ity_id <>", value, "imiItyId");
            return (Criteria) this;
        }

        public Criteria andImiItyIdGreaterThan(Integer value) {
            addCriterion("imi_ity_id >", value, "imiItyId");
            return (Criteria) this;
        }

        public Criteria andImiItyIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("imi_ity_id >=", value, "imiItyId");
            return (Criteria) this;
        }

        public Criteria andImiItyIdLessThan(Integer value) {
            addCriterion("imi_ity_id <", value, "imiItyId");
            return (Criteria) this;
        }

        public Criteria andImiItyIdLessThanOrEqualTo(Integer value) {
            addCriterion("imi_ity_id <=", value, "imiItyId");
            return (Criteria) this;
        }

        public Criteria andImiItyIdIn(List<Integer> values) {
            addCriterion("imi_ity_id in", values, "imiItyId");
            return (Criteria) this;
        }

        public Criteria andImiItyIdNotIn(List<Integer> values) {
            addCriterion("imi_ity_id not in", values, "imiItyId");
            return (Criteria) this;
        }

        public Criteria andImiItyIdBetween(Integer value1, Integer value2) {
            addCriterion("imi_ity_id between", value1, value2, "imiItyId");
            return (Criteria) this;
        }

        public Criteria andImiItyIdNotBetween(Integer value1, Integer value2) {
            addCriterion("imi_ity_id not between", value1, value2, "imiItyId");
            return (Criteria) this;
        }

        public Criteria andImiAnnexIdIsNull() {
            addCriterion("imi_annex_id is null");
            return (Criteria) this;
        }

        public Criteria andImiAnnexIdIsNotNull() {
            addCriterion("imi_annex_id is not null");
            return (Criteria) this;
        }

        public Criteria andImiAnnexIdEqualTo(Integer value) {
            addCriterion("imi_annex_id =", value, "imiAnnexId");
            return (Criteria) this;
        }

        public Criteria andImiAnnexIdNotEqualTo(Integer value) {
            addCriterion("imi_annex_id <>", value, "imiAnnexId");
            return (Criteria) this;
        }

        public Criteria andImiAnnexIdGreaterThan(Integer value) {
            addCriterion("imi_annex_id >", value, "imiAnnexId");
            return (Criteria) this;
        }

        public Criteria andImiAnnexIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("imi_annex_id >=", value, "imiAnnexId");
            return (Criteria) this;
        }

        public Criteria andImiAnnexIdLessThan(Integer value) {
            addCriterion("imi_annex_id <", value, "imiAnnexId");
            return (Criteria) this;
        }

        public Criteria andImiAnnexIdLessThanOrEqualTo(Integer value) {
            addCriterion("imi_annex_id <=", value, "imiAnnexId");
            return (Criteria) this;
        }

        public Criteria andImiAnnexIdIn(List<Integer> values) {
            addCriterion("imi_annex_id in", values, "imiAnnexId");
            return (Criteria) this;
        }

        public Criteria andImiAnnexIdNotIn(List<Integer> values) {
            addCriterion("imi_annex_id not in", values, "imiAnnexId");
            return (Criteria) this;
        }

        public Criteria andImiAnnexIdBetween(Integer value1, Integer value2) {
            addCriterion("imi_annex_id between", value1, value2, "imiAnnexId");
            return (Criteria) this;
        }

        public Criteria andImiAnnexIdNotBetween(Integer value1, Integer value2) {
            addCriterion("imi_annex_id not between", value1, value2, "imiAnnexId");
            return (Criteria) this;
        }

        public Criteria andImiStatusIsNull() {
            addCriterion("imi_status is null");
            return (Criteria) this;
        }

        public Criteria andImiStatusIsNotNull() {
            addCriterion("imi_status is not null");
            return (Criteria) this;
        }

        public Criteria andImiStatusEqualTo(Integer value) {
            addCriterion("imi_status =", value, "imiStatus");
            return (Criteria) this;
        }

        public Criteria andImiStatusNotEqualTo(Integer value) {
            addCriterion("imi_status <>", value, "imiStatus");
            return (Criteria) this;
        }

        public Criteria andImiStatusGreaterThan(Integer value) {
            addCriterion("imi_status >", value, "imiStatus");
            return (Criteria) this;
        }

        public Criteria andImiStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("imi_status >=", value, "imiStatus");
            return (Criteria) this;
        }

        public Criteria andImiStatusLessThan(Integer value) {
            addCriterion("imi_status <", value, "imiStatus");
            return (Criteria) this;
        }

        public Criteria andImiStatusLessThanOrEqualTo(Integer value) {
            addCriterion("imi_status <=", value, "imiStatus");
            return (Criteria) this;
        }

        public Criteria andImiStatusIn(List<Integer> values) {
            addCriterion("imi_status in", values, "imiStatus");
            return (Criteria) this;
        }

        public Criteria andImiStatusNotIn(List<Integer> values) {
            addCriterion("imi_status not in", values, "imiStatus");
            return (Criteria) this;
        }

        public Criteria andImiStatusBetween(Integer value1, Integer value2) {
            addCriterion("imi_status between", value1, value2, "imiStatus");
            return (Criteria) this;
        }

        public Criteria andImiStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("imi_status not between", value1, value2, "imiStatus");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}